package phapp.dao.custom;

import javacommon.base.*;
import cn.org.rapid_framework.page.*;
import org.springframework.stereotype.Component;

import phapp.model.custom.*;

/**
  * Title: t_custom_favorite 数据处理层
  * Description : 执行./mapper/的CustomFavoriteMapper.xml的相应SQL语句
  * Copyright: Copyright (c) 2012-10
  * Company:
  *
  * @author you name
  * @version 1.0
*/

@Component
public class CustomFavoriteDao extends BaseIbatis3Dao<CustomFavorite,java.lang.Integer>{

   public Class getEntityClass() {
      return CustomFavorite.class;
   }

   public void saveOrUpdate(CustomFavorite entity) {
      if(entity.getDataId() == null)
         save(entity);
      else
         update(entity);
   }

   /**
   * <p>批量删除<br>
   * Description :
   * @param CustomFavorite u
   * @return int
   * @author
   */
   public int removeByIdArry(CustomFavorite u) {
      int i=-1;
      i =delete("CustomFavorite.removeByIdArry", u);
      return i;
   }
   /**
   * <p>分页查询<br>
   * Description :
   * @param PageRequest pageRequest
   * @return Page
   * @author
   */
   public Page findByPageRequest(PageRequest pageRequest) {
      return pageQuery("CustomFavorite.pageSelect",pageRequest);
   }



}
